<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset=utf8>
</head>
<body>

<script>
   console.log(Math.PI);
   console.log(Math.E);

   //绝对值
   console.log(Math.abs(-99));
   console.log(Math.sqrt(4));
   console.log(Math.sqrt(2));

   console.log('floor: ' ,Math.floor(19.99));

   console.log('ceil: ',Math.ceil(19.000001));

   console.log('round: ',Math.round(19.99));
   console.log('round: ',Math.round(19.15));


   document.write("随机数: "+Math.random()+'<br>');

   document.write("0-9随机数: "+Math.floor(Math.random()*10)+'<br>');

   document.write("0-10随机数: "+Math.round(Math.random()*10)+'<br>');

   document.write("0-9随机数: "+Math.floor(Math.random()*1000000%10)+'<br>');
   document.write("0-10随机数: "+Math.round(Math.random()*100000%10)+'<br>');

   document.write("6-15随机数: "+Math.floor((Math.random()*10)+6)+'<br>');

</script>
    
</body>
</html>